<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>finfo 类</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.mime-content-type.html">« mime_content_type</a></li>
      <li style="float: right;"><a href="finfo.buffer.html">finfo::buffer »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.fileinfo.html">Fileinfo</a></li>
    <li>finfo 类</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.finfo" class="reference">

 <h1 class="title">finfo 类</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8, PECL fileinfo &gt;= 0.1.0)</p>


  <div class="section" id="finfo.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    该类在 fileinfo 函数集中提供了一个面向对象的接口。
   </p>
  </div>


  <div class="section" id="finfo.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass">
     
    </div>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">finfo</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="finfo.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = <strong><code>FILEINFO_NONE</code></strong></span></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$magic_database</code><span class="initializer"> = <strong><code>null</code></strong></span></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="finfo.buffer.html" class="methodname">buffer</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$string</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = <strong><code>FILEINFO_NONE</code></strong></span></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type">resource</span><span class="type"></span></span> <code class="parameter">$context</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type"><span class="type">string</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="finfo.file.html" class="methodname">file</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = <strong><code>FILEINFO_NONE</code></strong></span></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type">resource</span><span class="type"></span></span> <code class="parameter">$context</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type"><span class="type">string</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="finfo.set-flags.html" class="methodname">set_flags</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code></span>): <span class="type">bool</span></div>

   }</div>


  </div>

 </div>

 





















<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="finfo.buffer.html">finfo::buffer</a> — 别名 finfo_buffer()</li><li><a href="finfo.construct.html">finfo::__construct</a> — 别名 finfo_open</li><li><a href="finfo.file.html">finfo::file</a> — 别名 finfo_file()</li><li><a href="finfo.set-flags.html">finfo::set_flags</a> — 别名 finfo_set_flags()</li></ul>
</div>
</div></div></body></html>